package brinary;

public class BinaryDemo {
    public static void main(String[] args) {
        //Integer.toBinargSting
        int a=15;
        System.out.println(Integer.toBinaryString(a));//以二进制输出 1111
        System.out.println(a);//以十进制输出
        int b=11;
        System.out.println(Integer.toBinaryString(b));//以二进制输出 1011
        System.out.println(b);//以十进制输出

        //8 4 2 1
        // 0100  0111  1011  1001  1000  1010
        //4 7 b 9 8 a
        //0101 0011 0110 1100 0111 0101
        //5 3 6 c 7 5

    }
}
